package com.dt.platform.domain.oa;

import com.github.foxnic.dao.entity.Entity;
import io.swagger.annotations.ApiModel;
import javax.persistence.Table;
import com.github.foxnic.sql.meta.DBTable;
import com.dt.platform.constants.db.OaTables.OA_PROJECT;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.Transient;
import com.github.foxnic.api.swagger.EnumFor;
import javax.persistence.Id;
import org.github.foxnic.web.domain.hrm.Employee;
import java.util.List;
import org.github.foxnic.web.domain.system.DictItem;
import com.foxnicweb.web.domain.contract.Contract;
import org.github.foxnic.web.domain.hrm.Organization;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.foxnic.commons.lang.DataParser;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import com.github.foxnic.dao.entity.EntityContext;
import com.dt.platform.domain.oa.meta.ProjectMeta;
import com.github.foxnic.sql.data.ExprRcd;



/**
 * 项目管理
 * <p>项目管理 , 数据表 oa_project 的PO类型</p>
 * @author 金杰 , maillank@qq.com
 * @since 2025-07-06 14:15:22
 * @sign 5A0031269D4B89211A33228D4A40C77A
 * 此文件由工具自动生成，请勿修改。若表结构或配置发生变动，请使用工具重新生成。
*/

@Table(name = "oa_project")
@ApiModel(description = "项目管理 ; 项目管理 , 数据表 oa_project 的PO类型")
public class Project extends Entity {

	private static final long serialVersionUID = 1L;

	public static final DBTable TABLE =OA_PROJECT.$TABLE;
	
	/**
	 * 项目编号：项目编号
	*/
	@ApiModelProperty(required = false,value="项目编号" , notes = "项目编号" , example = "C617463")
	private String code;
	
	/**
	 * 关联合同：关联合同
	*/
	@ApiModelProperty(required = false,value="关联合同" , notes = "关联合同")
	private String contractId;
	
	/**
	 * 创建人ID：创建人ID
	*/
	@ApiModelProperty(required = false,value="创建人ID" , notes = "创建人ID" , example = "110588348101165911")
	private String createBy;
	
	/**
	 * 创建时间：创建时间
	*/
	@ApiModelProperty(required = false,value="创建时间" , notes = "创建时间" , example = "2025-06-30 10:53:12")
	private Date createTime;
	
	/**
	 * 当前阶段：当前阶段
	*/
	@ApiModelProperty(required = false,value="当前阶段" , notes = "当前阶段")
	private String curPhase;
	
	/**
	 * 删除人ID：删除人ID
	*/
	@ApiModelProperty(required = false,value="删除人ID" , notes = "删除人ID")
	private String deleteBy;
	
	/**
	 * 删除时间：删除时间
	*/
	@ApiModelProperty(required = false,value="删除时间" , notes = "删除时间")
	private Date deleteTime;
	
	/**
	 * 是否已删除：是否已删除
	*/
	@ApiModelProperty(required = true,value="是否已删除" , notes = "是否已删除" , example = "0")
	private Integer deleted;
	@Transient
	@EnumFor("deleted")
	private Boolean deletedBool;
	
	/**
	 * 结束时间：结束时间
	*/
	@ApiModelProperty(required = false,value="结束时间" , notes = "结束时间" , example = "2025-06-30 12:00:00")
	private Date edate;
	
	/**
	 * 附件：附件
	*/
	@ApiModelProperty(required = false,value="附件" , notes = "附件")
	private String fileId;
	
	/**
	 * 主键：主键
	*/
	@Id
	@ApiModelProperty(required = true,value="主键" , notes = "主键" , example = "709322193552539653")
	private String id;
	
	/**
	 * 项目经理：项目经理
	*/
	@ApiModelProperty(required = false,value="项目经理" , notes = "项目经理" , example = "E001")
	private String leaderId;
	
	/**
	 * 项目名称：项目名称
	*/
	@ApiModelProperty(required = false,value="项目名称" , notes = "项目名称" , example = "1212")
	private String name;
	
	/**
	 * 归属部门：归属部门
	*/
	@ApiModelProperty(required = false,value="归属部门" , notes = "归属部门" , example = "788871090188320766")
	private String orgId;
	
	/**
	 * 创建人员：创建人员
	*/
	@ApiModelProperty(required = false,value="创建人员" , notes = "创建人员" , example = "E001")
	private String ownerId;
	
	/**
	 * 项目介绍：项目介绍
	*/
	@ApiModelProperty(required = false,value="项目介绍" , notes = "项目介绍" , example = "1212")
	private String profile;
	
	/**
	 * 项目状态：项目状态
	*/
	@ApiModelProperty(required = false,value="项目状态" , notes = "项目状态" , example = "finish")
	private String projectStatus;
	
	/**
	 * 开始时间：开始时间
	*/
	@ApiModelProperty(required = false,value="开始时间" , notes = "开始时间" , example = "2025-06-30 12:00:00")
	private Date sdate;
	
	/**
	 * 租户：租户
	*/
	@ApiModelProperty(required = false,value="租户" , notes = "租户" , example = "T001")
	private String tenantId;
	
	/**
	 * 项目类型：项目类型
	*/
	@ApiModelProperty(required = false,value="项目类型" , notes = "项目类型" , example = "fw")
	private String type;
	
	/**
	 * 修改人ID：修改人ID
	*/
	@ApiModelProperty(required = false,value="修改人ID" , notes = "修改人ID" , example = "110588348101165911")
	private String updateBy;
	
	/**
	 * 修改时间：修改时间
	*/
	@ApiModelProperty(required = false,value="修改时间" , notes = "修改时间" , example = "2025-06-30 11:12:44")
	private Date updateTime;
	
	/**
	 * version：version
	*/
	@ApiModelProperty(required = false,value="version" , notes = "version" , example = "4")
	private Integer version;
	
	/**
	 * owner：owner
	*/
	@ApiModelProperty(required = false,value="owner" , notes = "owner")
	private Employee owner;
	
	/**
	 * leader：leader
	*/
	@ApiModelProperty(required = false,value="leader" , notes = "leader")
	private Employee leader;
	
	/**
	 * partUserList：partUserList
	*/
	@ApiModelProperty(required = false,value="partUserList" , notes = "partUserList")
	private List<Employee> partUserList;
	
	/**
	 * partUserStrList：partUserStrList
	*/
	@ApiModelProperty(required = false,value="partUserStrList" , notes = "partUserStrList")
	private List<String> partUserStrList;
	
	/**
	 * workTypeDict：workTypeDict
	*/
	@ApiModelProperty(required = false,value="workTypeDict" , notes = "workTypeDict")
	private DictItem workTypeDict;
	
	/**
	 * contract：contract
	*/
	@ApiModelProperty(required = false,value="contract" , notes = "contract")
	private Contract contract;
	
	/**
	 * organization：organization
	*/
	@ApiModelProperty(required = false,value="organization" , notes = "organization")
	private Organization organization;
	
	/**
	 * selectedCode：selectedCode
	*/
	@ApiModelProperty(required = false,value="selectedCode" , notes = "selectedCode")
	private String selectedCode;
	
	/**
	 * selectRange：selectRange
	*/
	@ApiModelProperty(required = false,value="selectRange" , notes = "selectRange")
	private String selectRange;
	
	/**
	 * taskCount：taskCount
	*/
	@ApiModelProperty(required = false,value="taskCount" , notes = "taskCount")
	private String taskCount;
	
	/**
	 * taskActingCount：taskActingCount
	*/
	@ApiModelProperty(required = false,value="taskActingCount" , notes = "taskActingCount")
	private String taskActingCount;
	
	/**
	 * taskCompleteCount：taskCompleteCount
	*/
	@ApiModelProperty(required = false,value="taskCompleteCount" , notes = "taskCompleteCount")
	private String taskCompleteCount;
	
	/**
	 * taskCompletePct：taskCompletePct
	*/
	@ApiModelProperty(required = false,value="taskCompletePct" , notes = "taskCompletePct")
	private String taskCompletePct;
	
	/**
	 * planTimeRange：planTimeRange
	*/
	@ApiModelProperty(required = false,value="planTimeRange" , notes = "planTimeRange")
	private String planTimeRange;
	
	/**
	 * workTimeTotal：workTimeTotal
	*/
	@ApiModelProperty(required = false,value="workTimeTotal" , notes = "workTimeTotal")
	private String workTimeTotal;
	
	/**
	 * planWorkTimeTotal：planWorkTimeTotal
	*/
	@ApiModelProperty(required = false,value="planWorkTimeTotal" , notes = "planWorkTimeTotal")
	private String planWorkTimeTotal;
	
	/**
	 * taskStat：taskStat
	*/
	@ApiModelProperty(required = false,value="taskStat" , notes = "taskStat")
	private String taskStat;
	
	/**
	 * projectPhase：projectPhase
	*/
	@ApiModelProperty(required = false,value="projectPhase" , notes = "projectPhase")
	private ProjectPhase ProjectPhase;
	
	/**
	 * ProjectPhaseList：ProjectPhaseList
	*/
	@ApiModelProperty(required = false,value="ProjectPhaseList" , notes = "ProjectPhaseList")
	private List<ProjectPhase> ProjectPhaseList;
	
	/**
	 * taskRcdCount：taskRcdCount
	*/
	@ApiModelProperty(required = false,value="taskRcdCount" , notes = "taskRcdCount")
	private String taskRcdCount;
	
	/**
	 * tabStatus：tabStatus
	*/
	@ApiModelProperty(required = false,value="tabStatus" , notes = "tabStatus")
	private String tabStatus;
	
	/**
	 * 获得 项目编号<br>
	 * 项目编号
	 * @return 项目编号
	*/
	public String getCode() {
		return code;
	}
	
	/**
	 * 设置 项目编号
	 * @param code 项目编号
	 * @return 当前对象
	*/
	public Project setCode(String code) {
		this.code=code;
		return this;
	}
	
	/**
	 * 获得 关联合同<br>
	 * 关联合同
	 * @return 关联合同
	*/
	public String getContractId() {
		return contractId;
	}
	
	/**
	 * 设置 关联合同
	 * @param contractId 关联合同
	 * @return 当前对象
	*/
	public Project setContractId(String contractId) {
		this.contractId=contractId;
		return this;
	}
	
	/**
	 * 获得 创建人ID<br>
	 * 创建人ID
	 * @return 创建人ID
	*/
	public String getCreateBy() {
		return createBy;
	}
	
	/**
	 * 设置 创建人ID
	 * @param createBy 创建人ID
	 * @return 当前对象
	*/
	public Project setCreateBy(String createBy) {
		this.createBy=createBy;
		return this;
	}
	
	/**
	 * 获得 创建时间<br>
	 * 创建时间
	 * @return 创建时间
	*/
	public Date getCreateTime() {
		return createTime;
	}
	
	/**
	 * 设置 创建时间
	 * @param createTime 创建时间
	 * @return 当前对象
	*/
	public Project setCreateTime(Date createTime) {
		this.createTime=createTime;
		return this;
	}
	
	/**
	 * 获得 当前阶段<br>
	 * 当前阶段
	 * @return 当前阶段
	*/
	public String getCurPhase() {
		return curPhase;
	}
	
	/**
	 * 设置 当前阶段
	 * @param curPhase 当前阶段
	 * @return 当前对象
	*/
	public Project setCurPhase(String curPhase) {
		this.curPhase=curPhase;
		return this;
	}
	
	/**
	 * 获得 删除人ID<br>
	 * 删除人ID
	 * @return 删除人ID
	*/
	public String getDeleteBy() {
		return deleteBy;
	}
	
	/**
	 * 设置 删除人ID
	 * @param deleteBy 删除人ID
	 * @return 当前对象
	*/
	public Project setDeleteBy(String deleteBy) {
		this.deleteBy=deleteBy;
		return this;
	}
	
	/**
	 * 获得 删除时间<br>
	 * 删除时间
	 * @return 删除时间
	*/
	public Date getDeleteTime() {
		return deleteTime;
	}
	
	/**
	 * 设置 删除时间
	 * @param deleteTime 删除时间
	 * @return 当前对象
	*/
	public Project setDeleteTime(Date deleteTime) {
		this.deleteTime=deleteTime;
		return this;
	}
	
	/**
	 * 获得 是否已删除<br>
	 * 是否已删除
	 * @return 是否已删除
	*/
	public Integer getDeleted() {
		return deleted;
	}
	
	/**
	 * 获得 是否已删除 的投影属性<br>
	 * 等价于 getDeleted 方法，获得对应的枚举类型
	 * @return 是否已删除
	*/
	@Transient
	public Boolean isDeleted() {
		if(this.deletedBool==null) {
			this.deletedBool=DataParser.parseBoolean(deleted);
		}
		return this.deletedBool ;
	}
	
	/**
	 * 设置 是否已删除
	 * @param deleted 是否已删除
	 * @return 当前对象
	*/
	@JsonProperty("deleted")
	public Project setDeleted(Integer deleted) {
		this.deleted=deleted;
		this.deletedBool=DataParser.parseBoolean(deleted);
		return this;
	}
	
	/**
	 * 设置 是否已删除的投影属性，等同于设置 是否已删除
	 * @param deletedBool 是否已删除
	 * @return 当前对象
	*/
	@Transient
	public Project setDeleted(Boolean deletedBool) {
		if(deletedBool==null) {
			this.deleted=null;
		} else {
			this.deleted=deletedBool?1:0;
		}
		this.deletedBool=deletedBool;
		return this;
	}
	
	/**
	 * 获得 结束时间<br>
	 * 结束时间
	 * @return 结束时间
	*/
	public Date getEdate() {
		return edate;
	}
	
	/**
	 * 设置 结束时间
	 * @param edate 结束时间
	 * @return 当前对象
	*/
	public Project setEdate(Date edate) {
		this.edate=edate;
		return this;
	}
	
	/**
	 * 获得 附件<br>
	 * 附件
	 * @return 附件
	*/
	public String getFileId() {
		return fileId;
	}
	
	/**
	 * 设置 附件
	 * @param fileId 附件
	 * @return 当前对象
	*/
	public Project setFileId(String fileId) {
		this.fileId=fileId;
		return this;
	}
	
	/**
	 * 获得 主键<br>
	 * 主键
	 * @return 主键
	*/
	public String getId() {
		return id;
	}
	
	/**
	 * 设置 主键
	 * @param id 主键
	 * @return 当前对象
	*/
	public Project setId(String id) {
		this.id=id;
		return this;
	}
	
	/**
	 * 获得 项目经理<br>
	 * 项目经理
	 * @return 项目经理
	*/
	public String getLeaderId() {
		return leaderId;
	}
	
	/**
	 * 设置 项目经理
	 * @param leaderId 项目经理
	 * @return 当前对象
	*/
	public Project setLeaderId(String leaderId) {
		this.leaderId=leaderId;
		return this;
	}
	
	/**
	 * 获得 项目名称<br>
	 * 项目名称
	 * @return 项目名称
	*/
	public String getName() {
		return name;
	}
	
	/**
	 * 设置 项目名称
	 * @param name 项目名称
	 * @return 当前对象
	*/
	public Project setName(String name) {
		this.name=name;
		return this;
	}
	
	/**
	 * 获得 归属部门<br>
	 * 归属部门
	 * @return 归属部门
	*/
	public String getOrgId() {
		return orgId;
	}
	
	/**
	 * 设置 归属部门
	 * @param orgId 归属部门
	 * @return 当前对象
	*/
	public Project setOrgId(String orgId) {
		this.orgId=orgId;
		return this;
	}
	
	/**
	 * 获得 创建人员<br>
	 * 创建人员
	 * @return 创建人员
	*/
	public String getOwnerId() {
		return ownerId;
	}
	
	/**
	 * 设置 创建人员
	 * @param ownerId 创建人员
	 * @return 当前对象
	*/
	public Project setOwnerId(String ownerId) {
		this.ownerId=ownerId;
		return this;
	}
	
	/**
	 * 获得 项目介绍<br>
	 * 项目介绍
	 * @return 项目介绍
	*/
	public String getProfile() {
		return profile;
	}
	
	/**
	 * 设置 项目介绍
	 * @param profile 项目介绍
	 * @return 当前对象
	*/
	public Project setProfile(String profile) {
		this.profile=profile;
		return this;
	}
	
	/**
	 * 获得 项目状态<br>
	 * 项目状态
	 * @return 项目状态
	*/
	public String getProjectStatus() {
		return projectStatus;
	}
	
	/**
	 * 设置 项目状态
	 * @param projectStatus 项目状态
	 * @return 当前对象
	*/
	public Project setProjectStatus(String projectStatus) {
		this.projectStatus=projectStatus;
		return this;
	}
	
	/**
	 * 获得 开始时间<br>
	 * 开始时间
	 * @return 开始时间
	*/
	public Date getSdate() {
		return sdate;
	}
	
	/**
	 * 设置 开始时间
	 * @param sdate 开始时间
	 * @return 当前对象
	*/
	public Project setSdate(Date sdate) {
		this.sdate=sdate;
		return this;
	}
	
	/**
	 * 获得 租户<br>
	 * 租户
	 * @return 租户
	*/
	public String getTenantId() {
		return tenantId;
	}
	
	/**
	 * 设置 租户
	 * @param tenantId 租户
	 * @return 当前对象
	*/
	public Project setTenantId(String tenantId) {
		this.tenantId=tenantId;
		return this;
	}
	
	/**
	 * 获得 项目类型<br>
	 * 项目类型
	 * @return 项目类型
	*/
	public String getType() {
		return type;
	}
	
	/**
	 * 设置 项目类型
	 * @param type 项目类型
	 * @return 当前对象
	*/
	public Project setType(String type) {
		this.type=type;
		return this;
	}
	
	/**
	 * 获得 修改人ID<br>
	 * 修改人ID
	 * @return 修改人ID
	*/
	public String getUpdateBy() {
		return updateBy;
	}
	
	/**
	 * 设置 修改人ID
	 * @param updateBy 修改人ID
	 * @return 当前对象
	*/
	public Project setUpdateBy(String updateBy) {
		this.updateBy=updateBy;
		return this;
	}
	
	/**
	 * 获得 修改时间<br>
	 * 修改时间
	 * @return 修改时间
	*/
	public Date getUpdateTime() {
		return updateTime;
	}
	
	/**
	 * 设置 修改时间
	 * @param updateTime 修改时间
	 * @return 当前对象
	*/
	public Project setUpdateTime(Date updateTime) {
		this.updateTime=updateTime;
		return this;
	}
	
	/**
	 * 获得 version<br>
	 * version
	 * @return version
	*/
	public Integer getVersion() {
		return version;
	}
	
	/**
	 * 设置 version
	 * @param version version
	 * @return 当前对象
	*/
	public Project setVersion(Integer version) {
		this.version=version;
		return this;
	}
	
	/**
	 * 获得 owner<br>
	 * owner
	 * @return owner
	*/
	public Employee getOwner() {
		return owner;
	}
	
	/**
	 * 设置 owner
	 * @param owner owner
	 * @return 当前对象
	*/
	public Project setOwner(Employee owner) {
		this.owner=owner;
		return this;
	}
	
	/**
	 * 获得 leader<br>
	 * leader
	 * @return leader
	*/
	public Employee getLeader() {
		return leader;
	}
	
	/**
	 * 设置 leader
	 * @param leader leader
	 * @return 当前对象
	*/
	public Project setLeader(Employee leader) {
		this.leader=leader;
		return this;
	}
	
	/**
	 * 获得 partUserList<br>
	 * partUserList
	 * @return partUserList
	*/
	public List<Employee> getPartUserList() {
		return partUserList;
	}
	
	/**
	 * 设置 partUserList
	 * @param partUserList partUserList
	 * @return 当前对象
	*/
	public Project setPartUserList(List<Employee> partUserList) {
		this.partUserList=partUserList;
		return this;
	}
	
	/**
	 * 添加 partUserList
	 * @param partUser partUserList
	 * @return 当前对象
	*/
	public Project addPartUser(Employee... partUser) {
		if(this.partUserList==null) {
			partUserList=new ArrayList<>();
		}
		this.partUserList.addAll(Arrays.asList(partUser));
		return this;
	}
	
	/**
	 * 获得 partUserStrList<br>
	 * partUserStrList
	 * @return partUserStrList
	*/
	public List<String> getPartUserStrList() {
		return partUserStrList;
	}
	
	/**
	 * 设置 partUserStrList
	 * @param partUserStrList partUserStrList
	 * @return 当前对象
	*/
	public Project setPartUserStrList(List<String> partUserStrList) {
		this.partUserStrList=partUserStrList;
		return this;
	}
	
	/**
	 * 添加 partUserStrList
	 * @param partUserStr partUserStrList
	 * @return 当前对象
	*/
	public Project addPartUserStr(String... partUserStr) {
		if(this.partUserStrList==null) {
			partUserStrList=new ArrayList<>();
		}
		this.partUserStrList.addAll(Arrays.asList(partUserStr));
		return this;
	}
	
	/**
	 * 获得 workTypeDict<br>
	 * workTypeDict
	 * @return workTypeDict
	*/
	public DictItem getWorkTypeDict() {
		return workTypeDict;
	}
	
	/**
	 * 设置 workTypeDict
	 * @param workTypeDict workTypeDict
	 * @return 当前对象
	*/
	public Project setWorkTypeDict(DictItem workTypeDict) {
		this.workTypeDict=workTypeDict;
		return this;
	}
	
	/**
	 * 获得 contract<br>
	 * contract
	 * @return contract
	*/
	public Contract getContract() {
		return contract;
	}
	
	/**
	 * 设置 contract
	 * @param contract contract
	 * @return 当前对象
	*/
	public Project setContract(Contract contract) {
		this.contract=contract;
		return this;
	}
	
	/**
	 * 获得 organization<br>
	 * organization
	 * @return organization
	*/
	public Organization getOrganization() {
		return organization;
	}
	
	/**
	 * 设置 organization
	 * @param organization organization
	 * @return 当前对象
	*/
	public Project setOrganization(Organization organization) {
		this.organization=organization;
		return this;
	}
	
	/**
	 * 获得 selectedCode<br>
	 * selectedCode
	 * @return selectedCode
	*/
	public String getSelectedCode() {
		return selectedCode;
	}
	
	/**
	 * 设置 selectedCode
	 * @param selectedCode selectedCode
	 * @return 当前对象
	*/
	public Project setSelectedCode(String selectedCode) {
		this.selectedCode=selectedCode;
		return this;
	}
	
	/**
	 * 获得 selectRange<br>
	 * selectRange
	 * @return selectRange
	*/
	public String getSelectRange() {
		return selectRange;
	}
	
	/**
	 * 设置 selectRange
	 * @param selectRange selectRange
	 * @return 当前对象
	*/
	public Project setSelectRange(String selectRange) {
		this.selectRange=selectRange;
		return this;
	}
	
	/**
	 * 获得 taskCount<br>
	 * taskCount
	 * @return taskCount
	*/
	public String getTaskCount() {
		return taskCount;
	}
	
	/**
	 * 设置 taskCount
	 * @param taskCount taskCount
	 * @return 当前对象
	*/
	public Project setTaskCount(String taskCount) {
		this.taskCount=taskCount;
		return this;
	}
	
	/**
	 * 获得 taskActingCount<br>
	 * taskActingCount
	 * @return taskActingCount
	*/
	public String getTaskActingCount() {
		return taskActingCount;
	}
	
	/**
	 * 设置 taskActingCount
	 * @param taskActingCount taskActingCount
	 * @return 当前对象
	*/
	public Project setTaskActingCount(String taskActingCount) {
		this.taskActingCount=taskActingCount;
		return this;
	}
	
	/**
	 * 获得 taskCompleteCount<br>
	 * taskCompleteCount
	 * @return taskCompleteCount
	*/
	public String getTaskCompleteCount() {
		return taskCompleteCount;
	}
	
	/**
	 * 设置 taskCompleteCount
	 * @param taskCompleteCount taskCompleteCount
	 * @return 当前对象
	*/
	public Project setTaskCompleteCount(String taskCompleteCount) {
		this.taskCompleteCount=taskCompleteCount;
		return this;
	}
	
	/**
	 * 获得 taskCompletePct<br>
	 * taskCompletePct
	 * @return taskCompletePct
	*/
	public String getTaskCompletePct() {
		return taskCompletePct;
	}
	
	/**
	 * 设置 taskCompletePct
	 * @param taskCompletePct taskCompletePct
	 * @return 当前对象
	*/
	public Project setTaskCompletePct(String taskCompletePct) {
		this.taskCompletePct=taskCompletePct;
		return this;
	}
	
	/**
	 * 获得 planTimeRange<br>
	 * planTimeRange
	 * @return planTimeRange
	*/
	public String getPlanTimeRange() {
		return planTimeRange;
	}
	
	/**
	 * 设置 planTimeRange
	 * @param planTimeRange planTimeRange
	 * @return 当前对象
	*/
	public Project setPlanTimeRange(String planTimeRange) {
		this.planTimeRange=planTimeRange;
		return this;
	}
	
	/**
	 * 获得 workTimeTotal<br>
	 * workTimeTotal
	 * @return workTimeTotal
	*/
	public String getWorkTimeTotal() {
		return workTimeTotal;
	}
	
	/**
	 * 设置 workTimeTotal
	 * @param workTimeTotal workTimeTotal
	 * @return 当前对象
	*/
	public Project setWorkTimeTotal(String workTimeTotal) {
		this.workTimeTotal=workTimeTotal;
		return this;
	}
	
	/**
	 * 获得 planWorkTimeTotal<br>
	 * planWorkTimeTotal
	 * @return planWorkTimeTotal
	*/
	public String getPlanWorkTimeTotal() {
		return planWorkTimeTotal;
	}
	
	/**
	 * 设置 planWorkTimeTotal
	 * @param planWorkTimeTotal planWorkTimeTotal
	 * @return 当前对象
	*/
	public Project setPlanWorkTimeTotal(String planWorkTimeTotal) {
		this.planWorkTimeTotal=planWorkTimeTotal;
		return this;
	}
	
	/**
	 * 获得 taskStat<br>
	 * taskStat
	 * @return taskStat
	*/
	public String getTaskStat() {
		return taskStat;
	}
	
	/**
	 * 设置 taskStat
	 * @param taskStat taskStat
	 * @return 当前对象
	*/
	public Project setTaskStat(String taskStat) {
		this.taskStat=taskStat;
		return this;
	}
	
	/**
	 * 获得 projectPhase<br>
	 * projectPhase
	 * @return projectPhase
	*/
	public ProjectPhase getProjectPhase() {
		return ProjectPhase;
	}
	
	/**
	 * 设置 projectPhase
	 * @param ProjectPhase projectPhase
	 * @return 当前对象
	*/
	public Project setProjectPhase(ProjectPhase ProjectPhase) {
		this.ProjectPhase=ProjectPhase;
		return this;
	}
	
	/**
	 * 获得 ProjectPhaseList<br>
	 * ProjectPhaseList
	 * @return ProjectPhaseList
	*/
	public List<ProjectPhase> getProjectPhaseList() {
		return ProjectPhaseList;
	}
	
	/**
	 * 设置 ProjectPhaseList
	 * @param ProjectPhaseList ProjectPhaseList
	 * @return 当前对象
	*/
	public Project setProjectPhaseList(List<ProjectPhase> ProjectPhaseList) {
		this.ProjectPhaseList=ProjectPhaseList;
		return this;
	}
	
	/**
	 * 添加 ProjectPhaseList
	 * @param ProjectPhase ProjectPhaseList
	 * @return 当前对象
	*/
	public Project addProjectPhase(ProjectPhase... ProjectPhase) {
		if(this.ProjectPhaseList==null) {
			ProjectPhaseList=new ArrayList<>();
		}
		this.ProjectPhaseList.addAll(Arrays.asList(ProjectPhase));
		return this;
	}
	
	/**
	 * 获得 taskRcdCount<br>
	 * taskRcdCount
	 * @return taskRcdCount
	*/
	public String getTaskRcdCount() {
		return taskRcdCount;
	}
	
	/**
	 * 设置 taskRcdCount
	 * @param taskRcdCount taskRcdCount
	 * @return 当前对象
	*/
	public Project setTaskRcdCount(String taskRcdCount) {
		this.taskRcdCount=taskRcdCount;
		return this;
	}
	
	/**
	 * 获得 tabStatus<br>
	 * tabStatus
	 * @return tabStatus
	*/
	public String getTabStatus() {
		return tabStatus;
	}
	
	/**
	 * 设置 tabStatus
	 * @param tabStatus tabStatus
	 * @return 当前对象
	*/
	public Project setTabStatus(String tabStatus) {
		this.tabStatus=tabStatus;
		return this;
	}

	/**
	 * 将自己转换成指定类型的PO
	 * @param poType  PO类型
	 * @return Project , 转换好的 Project 对象
	*/
	@Transient
	public <T extends Entity> T toPO(Class<T> poType) {
		return EntityContext.create(poType, this);
	}

	/**
	 * 将自己转换成任意指定类型
	 * @param pojoType  Pojo类型
	 * @return Project , 转换好的 PoJo 对象
	*/
	@Transient
	public <T> T toPojo(Class<T> pojoType) {
		if(Entity.class.isAssignableFrom(pojoType)) {
			return (T)this.toPO((Class<Entity>)pojoType);
		}
		try {
			T pojo=pojoType.newInstance();
			EntityContext.copyProperties(pojo, this);
			return pojo;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public Project clone() {
		return duplicate(true);
	}

	/**
	 * 复制当前对象
	 * @param all 是否复制全部属性，当 false 时，仅复制来自数据表的属性
	*/
	@Transient
	public Project duplicate(boolean all) {
		com.dt.platform.domain.oa.meta.ProjectMeta.$$proxy$$ inst = new com.dt.platform.domain.oa.meta.ProjectMeta.$$proxy$$();
		inst.setSdate(this.getSdate());
		inst.setCode(this.getCode());
		inst.setProfile(this.getProfile());
		inst.setUpdateTime(this.getUpdateTime());
		inst.setOwnerId(this.getOwnerId());
		inst.setType(this.getType());
		inst.setEdate(this.getEdate());
		inst.setVersion(this.getVersion());
		inst.setOrgId(this.getOrgId());
		inst.setLeaderId(this.getLeaderId());
		inst.setProjectStatus(this.getProjectStatus());
		inst.setCreateBy(this.getCreateBy());
		inst.setDeleted(this.getDeleted());
		inst.setCreateTime(this.getCreateTime());
		inst.setDeleteTime(this.getDeleteTime());
		inst.setUpdateBy(this.getUpdateBy());
		inst.setCurPhase(this.getCurPhase());
		inst.setContractId(this.getContractId());
		inst.setName(this.getName());
		inst.setTenantId(this.getTenantId());
		inst.setDeleteBy(this.getDeleteBy());
		inst.setId(this.getId());
		inst.setFileId(this.getFileId());
		if(all) {
			inst.setOwner(this.getOwner());
			inst.setLeader(this.getLeader());
			inst.setPartUserStrList(this.getPartUserStrList());
			inst.setTaskActingCount(this.getTaskActingCount());
			inst.setContract(this.getContract());
			inst.setTaskCompleteCount(this.getTaskCompleteCount());
			inst.setSelectedCode(this.getSelectedCode());
			inst.setWorkTypeDict(this.getWorkTypeDict());
			inst.setProjectPhaseList(this.getProjectPhaseList());
			inst.setTabStatus(this.getTabStatus());
			inst.setTaskRcdCount(this.getTaskRcdCount());
			inst.setTaskCount(this.getTaskCount());
			inst.setProjectPhase(this.getProjectPhase());
			inst.setTaskCompletePct(this.getTaskCompletePct());
			inst.setTaskStat(this.getTaskStat());
			inst.setSelectRange(this.getSelectRange());
			inst.setPartUserList(this.getPartUserList());
			inst.setOrganization(this.getOrganization());
			inst.setPlanTimeRange(this.getPlanTimeRange());
			inst.setWorkTimeTotal(this.getWorkTimeTotal());
			inst.setPlanWorkTimeTotal(this.getPlanWorkTimeTotal());
		}
		inst.clearModifies();
		return inst;
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public Project clone(boolean deep) {
		return EntityContext.clone(Project.class,this,deep);
	}

	/**
	 * 将 Map 转换成 Project
	 * @param projectMap 包含实体信息的 Map 对象
	 * @return Project , 转换好的的 Project 对象
	*/
	@Transient
	public static Project createFrom(Map<String,Object> projectMap) {
		if(projectMap==null) return null;
		Project po = create();
		EntityContext.copyProperties(po,projectMap);
		po.clearModifies();
		return po;
	}

	/**
	 * 将 Pojo 转换成 Project
	 * @param pojo 包含实体信息的 Pojo 对象
	 * @return Project , 转换好的的 Project 对象
	*/
	@Transient
	public static Project createFrom(Object pojo) {
		if(pojo==null) return null;
		Project po = create();
		EntityContext.copyProperties(po,pojo);
		po.clearModifies();
		return po;
	}

	/**
	 * 创建一个 Project，等同于 new
	 * @return Project 对象
	*/
	@Transient
	public static Project create() {
		return new com.dt.platform.domain.oa.meta.ProjectMeta.$$proxy$$();
	}

	/**
	 * 从 Map 读取
	 * @param map 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(Map<String, Object> map,boolean cast) {
		if(map==null) return false;
		if(cast) {
			this.setSdate(DataParser.parse(Date.class, map.get(ProjectMeta.SDATE)));
			this.setCode(DataParser.parse(String.class, map.get(ProjectMeta.CODE)));
			this.setProfile(DataParser.parse(String.class, map.get(ProjectMeta.PROFILE)));
			this.setUpdateTime(DataParser.parse(Date.class, map.get(ProjectMeta.UPDATE_TIME)));
			this.setOwnerId(DataParser.parse(String.class, map.get(ProjectMeta.OWNER_ID)));
			this.setType(DataParser.parse(String.class, map.get(ProjectMeta.TYPE)));
			this.setEdate(DataParser.parse(Date.class, map.get(ProjectMeta.EDATE)));
			this.setVersion(DataParser.parse(Integer.class, map.get(ProjectMeta.VERSION)));
			this.setOrgId(DataParser.parse(String.class, map.get(ProjectMeta.ORG_ID)));
			this.setLeaderId(DataParser.parse(String.class, map.get(ProjectMeta.LEADER_ID)));
			this.setProjectStatus(DataParser.parse(String.class, map.get(ProjectMeta.PROJECT_STATUS)));
			this.setCreateBy(DataParser.parse(String.class, map.get(ProjectMeta.CREATE_BY)));
			this.setDeleted(DataParser.parse(Integer.class, map.get(ProjectMeta.DELETED)));
			this.setCreateTime(DataParser.parse(Date.class, map.get(ProjectMeta.CREATE_TIME)));
			this.setDeleteTime(DataParser.parse(Date.class, map.get(ProjectMeta.DELETE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, map.get(ProjectMeta.UPDATE_BY)));
			this.setCurPhase(DataParser.parse(String.class, map.get(ProjectMeta.CUR_PHASE)));
			this.setContractId(DataParser.parse(String.class, map.get(ProjectMeta.CONTRACT_ID)));
			this.setName(DataParser.parse(String.class, map.get(ProjectMeta.NAME)));
			this.setTenantId(DataParser.parse(String.class, map.get(ProjectMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, map.get(ProjectMeta.DELETE_BY)));
			this.setId(DataParser.parse(String.class, map.get(ProjectMeta.ID)));
			this.setFileId(DataParser.parse(String.class, map.get(ProjectMeta.FILE_ID)));
			// others
			this.setOwner(DataParser.parse(Employee.class, map.get(ProjectMeta.OWNER)));
			this.setLeader(DataParser.parse(Employee.class, map.get(ProjectMeta.LEADER)));
			this.setTaskActingCount(DataParser.parse(String.class, map.get(ProjectMeta.TASK_ACTING_COUNT)));
			this.setContract(DataParser.parse(Contract.class, map.get(ProjectMeta.CONTRACT)));
			this.setTaskCompleteCount(DataParser.parse(String.class, map.get(ProjectMeta.TASK_COMPLETE_COUNT)));
			this.setSelectedCode(DataParser.parse(String.class, map.get(ProjectMeta.SELECTED_CODE)));
			this.setWorkTypeDict(DataParser.parse(DictItem.class, map.get(ProjectMeta.WORK_TYPE_DICT)));
			this.setTabStatus(DataParser.parse(String.class, map.get(ProjectMeta.TAB_STATUS)));
			this.setTaskRcdCount(DataParser.parse(String.class, map.get(ProjectMeta.TASK_RCD_COUNT)));
			this.setTaskCount(DataParser.parse(String.class, map.get(ProjectMeta.TASK_COUNT)));
			this.setProjectPhase(DataParser.parse(ProjectPhase.class, map.get(ProjectMeta.PROJECT_PHASE)));
			this.setTaskCompletePct(DataParser.parse(String.class, map.get(ProjectMeta.TASK_COMPLETE_PCT)));
			this.setTaskStat(DataParser.parse(String.class, map.get(ProjectMeta.TASK_STAT)));
			this.setSelectRange(DataParser.parse(String.class, map.get(ProjectMeta.SELECT_RANGE)));
			this.setOrganization(DataParser.parse(Organization.class, map.get(ProjectMeta.ORGANIZATION)));
			this.setPlanTimeRange(DataParser.parse(String.class, map.get(ProjectMeta.PLAN_TIME_RANGE)));
			this.setWorkTimeTotal(DataParser.parse(String.class, map.get(ProjectMeta.WORK_TIME_TOTAL)));
			this.setPlanWorkTimeTotal(DataParser.parse(String.class, map.get(ProjectMeta.PLAN_WORK_TIME_TOTAL)));
			return true;
		} else {
			try {
				this.setSdate( (Date)map.get(ProjectMeta.SDATE));
				this.setCode( (String)map.get(ProjectMeta.CODE));
				this.setProfile( (String)map.get(ProjectMeta.PROFILE));
				this.setUpdateTime( (Date)map.get(ProjectMeta.UPDATE_TIME));
				this.setOwnerId( (String)map.get(ProjectMeta.OWNER_ID));
				this.setType( (String)map.get(ProjectMeta.TYPE));
				this.setEdate( (Date)map.get(ProjectMeta.EDATE));
				this.setVersion( (Integer)map.get(ProjectMeta.VERSION));
				this.setOrgId( (String)map.get(ProjectMeta.ORG_ID));
				this.setLeaderId( (String)map.get(ProjectMeta.LEADER_ID));
				this.setProjectStatus( (String)map.get(ProjectMeta.PROJECT_STATUS));
				this.setCreateBy( (String)map.get(ProjectMeta.CREATE_BY));
				this.setDeleted( (Integer)map.get(ProjectMeta.DELETED));
				this.setCreateTime( (Date)map.get(ProjectMeta.CREATE_TIME));
				this.setDeleteTime( (Date)map.get(ProjectMeta.DELETE_TIME));
				this.setUpdateBy( (String)map.get(ProjectMeta.UPDATE_BY));
				this.setCurPhase( (String)map.get(ProjectMeta.CUR_PHASE));
				this.setContractId( (String)map.get(ProjectMeta.CONTRACT_ID));
				this.setName( (String)map.get(ProjectMeta.NAME));
				this.setTenantId( (String)map.get(ProjectMeta.TENANT_ID));
				this.setDeleteBy( (String)map.get(ProjectMeta.DELETE_BY));
				this.setId( (String)map.get(ProjectMeta.ID));
				this.setFileId( (String)map.get(ProjectMeta.FILE_ID));
				// others
				this.setOwner( (Employee)map.get(ProjectMeta.OWNER));
				this.setLeader( (Employee)map.get(ProjectMeta.LEADER));
				this.setTaskActingCount( (String)map.get(ProjectMeta.TASK_ACTING_COUNT));
				this.setContract( (Contract)map.get(ProjectMeta.CONTRACT));
				this.setTaskCompleteCount( (String)map.get(ProjectMeta.TASK_COMPLETE_COUNT));
				this.setSelectedCode( (String)map.get(ProjectMeta.SELECTED_CODE));
				this.setWorkTypeDict( (DictItem)map.get(ProjectMeta.WORK_TYPE_DICT));
				this.setTabStatus( (String)map.get(ProjectMeta.TAB_STATUS));
				this.setTaskRcdCount( (String)map.get(ProjectMeta.TASK_RCD_COUNT));
				this.setTaskCount( (String)map.get(ProjectMeta.TASK_COUNT));
				this.setProjectPhase( (ProjectPhase)map.get(ProjectMeta.PROJECT_PHASE));
				this.setTaskCompletePct( (String)map.get(ProjectMeta.TASK_COMPLETE_PCT));
				this.setTaskStat( (String)map.get(ProjectMeta.TASK_STAT));
				this.setSelectRange( (String)map.get(ProjectMeta.SELECT_RANGE));
				this.setOrganization( (Organization)map.get(ProjectMeta.ORGANIZATION));
				this.setPlanTimeRange( (String)map.get(ProjectMeta.PLAN_TIME_RANGE));
				this.setWorkTimeTotal( (String)map.get(ProjectMeta.WORK_TIME_TOTAL));
				this.setPlanWorkTimeTotal( (String)map.get(ProjectMeta.PLAN_WORK_TIME_TOTAL));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}

	/**
	 * 从 Map 读取
	 * @param r 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(ExprRcd r,boolean cast) {
		if(r==null) return false;
		if(cast) {
			this.setSdate(DataParser.parse(Date.class, r.getValue(ProjectMeta.SDATE)));
			this.setCode(DataParser.parse(String.class, r.getValue(ProjectMeta.CODE)));
			this.setProfile(DataParser.parse(String.class, r.getValue(ProjectMeta.PROFILE)));
			this.setUpdateTime(DataParser.parse(Date.class, r.getValue(ProjectMeta.UPDATE_TIME)));
			this.setOwnerId(DataParser.parse(String.class, r.getValue(ProjectMeta.OWNER_ID)));
			this.setType(DataParser.parse(String.class, r.getValue(ProjectMeta.TYPE)));
			this.setEdate(DataParser.parse(Date.class, r.getValue(ProjectMeta.EDATE)));
			this.setVersion(DataParser.parse(Integer.class, r.getValue(ProjectMeta.VERSION)));
			this.setOrgId(DataParser.parse(String.class, r.getValue(ProjectMeta.ORG_ID)));
			this.setLeaderId(DataParser.parse(String.class, r.getValue(ProjectMeta.LEADER_ID)));
			this.setProjectStatus(DataParser.parse(String.class, r.getValue(ProjectMeta.PROJECT_STATUS)));
			this.setCreateBy(DataParser.parse(String.class, r.getValue(ProjectMeta.CREATE_BY)));
			this.setDeleted(DataParser.parse(Integer.class, r.getValue(ProjectMeta.DELETED)));
			this.setCreateTime(DataParser.parse(Date.class, r.getValue(ProjectMeta.CREATE_TIME)));
			this.setDeleteTime(DataParser.parse(Date.class, r.getValue(ProjectMeta.DELETE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, r.getValue(ProjectMeta.UPDATE_BY)));
			this.setCurPhase(DataParser.parse(String.class, r.getValue(ProjectMeta.CUR_PHASE)));
			this.setContractId(DataParser.parse(String.class, r.getValue(ProjectMeta.CONTRACT_ID)));
			this.setName(DataParser.parse(String.class, r.getValue(ProjectMeta.NAME)));
			this.setTenantId(DataParser.parse(String.class, r.getValue(ProjectMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, r.getValue(ProjectMeta.DELETE_BY)));
			this.setId(DataParser.parse(String.class, r.getValue(ProjectMeta.ID)));
			this.setFileId(DataParser.parse(String.class, r.getValue(ProjectMeta.FILE_ID)));
			return true;
		} else {
			try {
				this.setSdate( (Date)r.getValue(ProjectMeta.SDATE));
				this.setCode( (String)r.getValue(ProjectMeta.CODE));
				this.setProfile( (String)r.getValue(ProjectMeta.PROFILE));
				this.setUpdateTime( (Date)r.getValue(ProjectMeta.UPDATE_TIME));
				this.setOwnerId( (String)r.getValue(ProjectMeta.OWNER_ID));
				this.setType( (String)r.getValue(ProjectMeta.TYPE));
				this.setEdate( (Date)r.getValue(ProjectMeta.EDATE));
				this.setVersion( (Integer)r.getValue(ProjectMeta.VERSION));
				this.setOrgId( (String)r.getValue(ProjectMeta.ORG_ID));
				this.setLeaderId( (String)r.getValue(ProjectMeta.LEADER_ID));
				this.setProjectStatus( (String)r.getValue(ProjectMeta.PROJECT_STATUS));
				this.setCreateBy( (String)r.getValue(ProjectMeta.CREATE_BY));
				this.setDeleted( (Integer)r.getValue(ProjectMeta.DELETED));
				this.setCreateTime( (Date)r.getValue(ProjectMeta.CREATE_TIME));
				this.setDeleteTime( (Date)r.getValue(ProjectMeta.DELETE_TIME));
				this.setUpdateBy( (String)r.getValue(ProjectMeta.UPDATE_BY));
				this.setCurPhase( (String)r.getValue(ProjectMeta.CUR_PHASE));
				this.setContractId( (String)r.getValue(ProjectMeta.CONTRACT_ID));
				this.setName( (String)r.getValue(ProjectMeta.NAME));
				this.setTenantId( (String)r.getValue(ProjectMeta.TENANT_ID));
				this.setDeleteBy( (String)r.getValue(ProjectMeta.DELETE_BY));
				this.setId( (String)r.getValue(ProjectMeta.ID));
				this.setFileId( (String)r.getValue(ProjectMeta.FILE_ID));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}
}